<template>
	<u-image :width="width" :height="height" :src="getStaticUrl(src)" :mode="mode" :lazyLoad="lazyLoad"
		:radius="radius">
		<template v-slot:loading>
			<u-loading-icon color="red"></u-loading-icon>
		</template>
	</u-image>
</template>

<script>
	export default {
		props: {
			width: String | Number,
			height: String | Number,
			src: String,
			mode: {
				type: String,
				default: 'aspectFit'
			},
			lazyLoad: {
				type: Boolean,
				default: false
			},
			radius: {
				type: String | Number,
				default: 0
			},
			preview: {
				type: Boolean,
				default: false
			},
		},
		computed: {
			getStaticUrl() {
				return (src) => this.$utils.getStaticUrl(src)
			}
		},
		methods: {}
	}
</script>

<style>
</style>